import com.fasterxml.jackson.core.type.TypeReference;
import com.leyou.common.utils.JsonUtils;

import java.util.List;
import java.util.Map;

public class test {

    public static void main(String[] args) {
       /* User user = new User("Jack", 21);
        String s = JsonUtils.toString(user);
        System.out.println(s);
        User user1= (User)  JsonUtils.toBean(s,User.class);
        System.out.println("user1 = " + user1);*/
        String json = "[{\"name\":\"Jack\", \"age\": \"21\"}, {\"name\":\"Rose\", \"age\": \"18\"}]";
        List<Map<String,String>> maps=
                JsonUtils.nativeRead(json, new TypeReference<List<Map<String,String>>>() {
                });
        System.out.println("maps = " + maps);
    }
}
